package com.spring.model;

import com.spring.locale.LocaleMessageService;

/**
 * Created by Harry on 2017/5/19.
 */
public class ErrorCodeMap{
    private static LocaleMessageService localeMessageService;

    public static void init(LocaleMessageService localeMessageService){
        ErrorCodeMap.localeMessageService = localeMessageService;
    }

    public static String getValueByCode(String code) {
        if ( null == code || code.trim().length()==0 ) return "";
        return localeMessageService.getMessage(code);
    }
}